package com.zretc.auth.service;

import com.zretc.api.pojo.SysUser;
import com.zretc.auth.dao.SysUserMapper;
import com.zretc.auth.dao.UserInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class SysUserService {
    @Autowired
    private SysUserMapper sysUserMapper;
    @Autowired
    private UserInfoMapper userInfoMapper;
    public SysUser querySysUserInfo(Integer id)
    {
        SysUser user = sysUserMapper.getUserById(id);
        return user;
    }
    public boolean updateSysUserInfo(SysUser user)
    {
        return sysUserMapper.updateSysUserInfo(user)==1 && userInfoMapper.updateUserInfo(user)==1;
    }
}
